pic_assembler = gpasm
pic_linker = gplink

pic_chip = 16f88
pic_obj = g-aux.o
pic_link = ../16f88.lkr
pic_hex = g-aux.hex

$(pic_hex): $(pic_obj)
	$(pic_linker) -m -s $(pic_link) -o $(pic_hex) $?

%.o: %.asm
	$(pic_assembler) -c $<
        
burn: $(pic_hex)
	picprog --erase --burn -d pic$(pic_chip) -p /dev/ttyS1 -i $?

erase:
	picprog --erase --burn -d pic$(pic_chip) -p /dev/ttyS1

clean:
	-rm *.err *.o *.lst *.map *.hex *.cod
